package com.store.business;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

@Entity
public class ProductInStock {
	
	private String description;
	private float price;
	private int id;
	ProductOrder order;
	CompanyInDatabase company;
	
	
	public ProductInStock(){
		super();
	}
	
	public ProductInStock(String description, float price) {
		super();
		this.description = description;
		this.price = price;
	}

	@Id 
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@ManyToOne
	public CompanyInDatabase getCompany() {
		return company;
	}

	public void setCompany(CompanyInDatabase company) {
		this.company = company;
	}
	
	@OneToOne
	public ProductOrder getOrder() {
		return order;
	}

	public void setOrder(ProductOrder order) {
		this.order = order;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	
	
	

}
